<template>
  <div>
    <a-button type="link" @click="handleOpenCusColumn">
      <div class="disFlxAC">
        <a-icon type="setting" class="_mr-5" />
        自定义列表
      </div>
    </a-button>
    <CusColumns ref="cusColumns" />
  </div>
</template>

<script>
import CusColumns from './cusColumns'
export default {
  components: {
    CusColumns
  },
  props: {
    name: {
      type: String,
      default: ''
    },
    columns: {
      type: Array,
      default: () => []
    },
    newColumns: {
      type: Array,
      default: () => []
    }
  },
  methods: {
    // 打开自定义列
    handleOpenCusColumn() {
      const params = {
        tableName: this.name,
        columns: this.columns,
        newColumns: this.newColumns
      }
      this.$refs.cusColumns.show(params)
    }
  }
}
</script>

<style lang="less" scoped></style>
